package com.ruoyi.app.controller;


import com.ruoyi.app.model.vo.IndexPageReq;
import com.ruoyi.app.model.vo.UserInfoReq;
import com.ruoyi.app.service.UserService;
import com.ruoyi.common.annotation.PassToken;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "匹配对象", tags = "匹配对象接口")
@RestController
@RequestMapping("/api/matching")
@Slf4j
public class MatchingController {


    @Autowired
    private UserService userService;


    @ApiOperation("首页")
    @PostMapping("/index")
    @PassToken
    public AjaxResult indexPage(@RequestBody IndexPageReq req) {
        return AjaxResult.success(userService.indexPage(req));
    }


    @ApiOperation("首页用户详情")
    @PostMapping("/user-info")
    public AjaxResult userInfo(@RequestBody UserInfoReq req) {
        return AjaxResult.success(userService.userInfo(req));
    }


}
